#include <algorithm>
#include "Tokenizer.h"
#include "log.h"

int main(int argc, char* argv[]) {

	if(argc < 2)
	{
		std::cout << "too few args" <<std::endl;
		return 0;
	}

	log::log_open();

	std::string arg1(argv[1]);
	//remove spaces
	arg1.erase( std::remove_if( arg1.begin(), arg1.end(), ::isspace ), arg1.end() );

	long int result = 0;

	oputils::Tokenizer tkn;
	result = tkn.calculateExpression(arg1);

	std::cout << result << std::endl;

	log::log_close();

	return 0;
}
